import request from '@/utils/request'

export function pickList(data) {
    return request({
      url: '/shop/pickAddr/page',
      method: 'get',
      params: data,
      headers: {
        'Authorization':localStorage.getItem('token')
      }
    })
  }
// 添加
export function pickAdd (data){
  return request({
      method: "post",
      url: ('/shop/pickAddr'),
      data,
      headers: {
        'Authorization':localStorage.getItem('token')
      }
  })
}
//选择器
export function pickArea (data){
    return request({
        method: "get",
        url: ('/admin/area/listByPid'),
        params: data,
        headers: {
          'Authorization':localStorage.getItem('token')
        }
    })
}

// 修改
export function pickEdit(data){
    return request({
        method: "put",
        url: (`/shop/pickAddr`),
        data,
        headers: {
          'Authorization':localStorage.getItem('token')
        }
    })
}
// 删除
export function pickDelete(id){
    return request({
        method: "delete",
        url: (`/shop/pickAddr`),
        data:id,
        headers: {
          'Authorization':localStorage.getItem('token')
        }
    })
}
